package com.ceshiren.hogwarts.wework;

import io.appium.java_client.AppiumDriver;
import io.appium.java_client.android.AndroidDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

import java.time.Duration;

public class DefaultPage extends BasePage{


    By contact_tab=By.xpath("//*[@text='通讯录']");
    public DefaultPage(AppiumDriver driver) {
        super(driver);

        wait(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@text='通讯录']")),15);
    }

    public ContactPage ToContactPage(){
        driver.findElement(contact_tab).click();
        return new ContactPage(this.driver);
    }
}
